﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/Main.Master" AutoEventWireup="true" CodeBehind="InventoryManagementDelete.aspx.cs" Inherits="RestaurantManagerWebApp.Pages.StockManagement.InventoryManagementDelete" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Table ID="tblControl" runat="server">
        <asp:TableRow>
            <asp:TableCell HorizontalAlign="Center"><strong>Add</strong><br /><a href="InventoryManagementAdd.aspx"><img alt="add_icon" width="100px" src="../../Images/Controls/Button-Add-icon.png" /></a>
            </asp:TableCell>
            <asp:TableCell HorizontalAlign="Center"><strong>View</strong><br /><a href="InventoryManagementView.aspx"><img alt="view_icon" width="100px" src="../../Images/Controls/Dj-View-icon.png" /></a>
            </asp:TableCell>
            <asp:TableCell HorizontalAlign="Center"><strong>Update</strong><br /><a href="InventoryManagementUpdate.aspx"><img alt="update_icon" width="100px" src="../../Images/Controls/edit-validated-icon.png" /></a>
            </asp:TableCell>
            <asp:TableCell HorizontalAlign="Center"><strong>Delete</strong><br /><a href="InventoryManagementDelete.aspx"><img alt="delete_icon" width="100px" src="../../Images/Controls/Alarm-Error-icon.png" /></a>
            </asp:TableCell>
        </asp:TableRow>
    </asp:Table>
    <h2>Inventory[DELETE]</h2><br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4" DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None">
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        <Columns>
            <asp:BoundField DataField="i_name" HeaderText="Ingredient Name" SortExpression="i_name" />
            <asp:BoundField DataField="i_quantity" HeaderText="Quantity" SortExpression="i_quantity" />
            <asp:BoundField DataField="m_name" HeaderText="Metrics" SortExpression="m_name" />
            <asp:BoundField DataField="m_id" HeaderText="m_id" InsertVisible="False" ReadOnly="True" SortExpression="m_id" />
            <asp:CommandField ButtonType="Button" ShowDeleteButton="True" />
        </Columns>
        <EditRowStyle BackColor="#999999" />
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#E9E7E2" />
        <SortedAscendingHeaderStyle BackColor="#506C8C" />
        <SortedDescendingCellStyle BackColor="#FFFDF8" />
        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
        </asp:GridView> <br />
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:RestaurantConnectionString %>" DeleteCommand="DELETE FROM Ingredient FROM Ingredient INNER JOIN Metrics ON Ingredient.m_id = Metrics.m_id INNER JOIN Category ON Ingredient.c_id = Category.c_id" SelectCommand="SELECT Ingredient.i_name, Ingredient.i_quantity, Metrics.m_name, Metrics.m_id FROM Ingredient INNER JOIN Metrics ON Ingredient.m_id = Metrics.m_id INNER JOIN Category ON Ingredient.c_id = Category.c_id"></asp:SqlDataSource>
</asp:Content>
